<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%><%@page import="com.hz.ys_clientorder.bean.Orderinfo"%><%@page import="com.hz.ys_clientorder.bean.Clientinfo"%>


<%@ include file="../common/commonJS.jsp" %>
<%@ include file="../common/commonLabel.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
Orderinfo o = (Orderinfo)request.getAttribute("order");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>订单结算</title>
<script type="text/javascript">
//保存并查询
function doIns(){
	if(check()){
		if(confirm("确认保存信息?")){
			document.all.operate.value = "insinfo";
			document.forms[0].submit();
		}
	}
}
 //限制添加快捷内容的字数  
var maxLength =30; 
function MaxInput(fo,len) {
	if(len!=""){
		maxLength=len;
	}
	if (fo.value.length > maxLength) {
		alert("输入内容过多！");
		fo.value = fo.value.substring(0, maxLength);
	}
}
function doback(){
	history.back();
}
</script>
</head>
<body>
<form action="<%=path %>/balance.action" method="post">
<table width="760" border="0" cellpadding="0" cellspacing="0" >
  <tr>
     <td>
     <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" class="MainBody">
      <tr>
        <td width="760" class="MainBody_title">订单结算</td>
      </tr>
        <tr>
          <td valign="top"><input name="operate" type="hidden" value=""/>
          <input name="to.orderId" type="hidden" value="<%=o.getOrderId()%>"/>
          <input name="to.supplierid" type="hidden" value="<%=o.getClientId() %>"/>
          <input name="to.suppliername" type="hidden" value=""/>
          <div align="right" style="padding: 10 50 10 0;">
			<input type="button" class="btn" value="保 存" onclick="doIns()"/>&nbsp;&nbsp;
			<input type="reset" class="btn" value="重 置" />&nbsp;&nbsp;
			<input type="button" class="btn" value="返 回" onclick="doback()"/>&nbsp;&nbsp;</div>
          <table  border="0" cellpadding="0" cellspacing="0" class="MainBody_table">
                <tr>
                  <td  colspan="6" class="bg_title">订 单 结 算</td>
                </tr>
                
                
                <tr>
                  <th nowrap="nowrap">订单名称</th> 
                  <td>
                  <input type="text" maxlength="50" value="<%=o.getName() %>"  class="readinput" readonly /></td>
                  <th nowrap="nowrap">总金额</th>
                  <td><input type="text" maxlength="50" value="<%=o.getTotal() %>"  class="readinput" readonly /></select></td>
                  <th nowrap="nowrap">预付款</th>
                  <td><input type="text" maxlength="50" value="<%=o.getFrontCash() %>"  class="readinput" readonly /></td>
                </tr>
                
                <tr>
                  <th width="13%" nowrap="nowrap">经手人</th>
                  <td width="20%" ><input name="to.createuser" value="${sessionScope.admin_user.personname}" type="text" class="readinput" readonly /></td>
                  <th width="13%" nowrap="nowrap">付款日期</th> 
                  <td width="20%"><input name="to.tpdate" type="text"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})" class="Wdate"/></td>
                  <th width="13%" nowrap="nowrap">付款人</th>
                  <td width="20%"><select name="to.tpperson" style="width: 98%">
                  		<c:forEach var="person" varStatus="status" items="${personlist}">
						<option value="${person.personname }" <c:if test="${sessionScope.admin_user.personname==person.personname}">selected</c:if>>${person.personname }</option>
						</c:forEach></select></td>
                </tr>
                
                <tr>
                  <th nowrap="nowrap">应付金额</th> 
                  <td><input name="to.tpmoney" type="text" maxlength="50" value="<%=o.getDebtCash() %>"  class="readinput" readonly /></td>
                  <th nowrap="nowrap">付款方式</th>
                  <td><select name="to.tpway" style="width: 80%" ></select></td>
                  <th nowrap="nowrap">实付金额</th>
                  <td><input name="to.realmoney" type="text" maxlength="50"/></td>
                </tr>
                
                <tr>
                  <th nowrap="nowrap">发票金额</th>
                  <td ><input name="to.billmoney" type="text" maxlength="50"/></td>
                  <th nowrap="nowrap">发票类型</th> 
                  <td ><select name="to.billtype" style="width: 95%" ></select></td>
                  <th nowrap="nowrap">发票编号</th>
                  <td ><input name="to.bill" type="text" maxlength="50"/></td>
                </tr>
                
                <tr>
                  <th align="center" nowrap="nowrap" >备注信息</th> 
                  <td colspan="5"><textarea name="to.remark" style="width: 100%;" rows="5" onblur="MaxInput(this,100)"></textarea></td>
                </tr>
            </table>
		</td>
	</tr>
</table></td></tr></table>
<script type="text/javascript">
doSelectInfo(document.all["to.tpway"],'tpway','',false);
doSelectInfo(document.all["to.billtype"],'billtype','',false);
doDate("to.tpdate");
</script>
</form>
</body>
</html>